# -*- coding: UTF-8 -*- #
"""
@filename:01-6matplotlib模块应用开发.py
@author:JiYujia
@time:2022-09-05
"""

import  matplotlib.pylab as plt

x = [0, 1, 2, 3, 4]
y = [5, 6, 7, 8, 9]
m = [1, 3, 4, 7, 9]
n = [8, 2, 5, 2, 7]

# 隐式创建
# plt.plot(x, y)
# plt.show()

# 显式创建
# 手动创建画布对象
figure = plt.figure()
# 获取axes对象
axes1 = figure.add_subplot(2, 1, 1)
axes2 = figure.add_subplot(2, 1, 2)

axes1.plot(x, y)
axes2.plot(m, n)

plt.show()
